from pydantic import BaseModel, Field
from datetime import date

# 就业信息请求/响应模型
class Emp_Schema(BaseModel):
    student_id: int = Field(..., description="学生编号（唯一）")
    student_name: str = Field(None, description="学生姓名（冗余，可选）")
    class_name: str = Field(None, description="学生班级（冗余，可选）")  # 与模型保持字符串类型
    job_search_start_date: date = Field(..., description="就业开放时间（必填）")
    offer_received_date: date = Field(..., description="offer下放时间（必填）")
    company_name: str = Field(..., description="就业公司名称（必填）")
    salary: int = Field(..., description="就业薪资（必填）")  # 与模型保持int类型

    class Config:
        orm_mode = True  # 支持ORM模型转换